Previous Book Contents Book Index Next

Inside Macintosh: Programming With the Text Encoding Conversion Manager /
Chapter 3 - Text Encoding Converter Reference / Text Encoding Converter Functions
Identifying Direct Encoding Conversions /


TECGetDirectTextEncodingConversions

Returns the types of direct conversions the Text Encoding Converter supports in its current configuration.

pascal OSStatus TECGetDirectTextEncodingConversions (
                     TECConversionInfo directConversions[],
                     ItemCount maxDirectConversions,
                     ItemCount *actualDirectConversions);
directConversions[]
An array composed of text encoding conversion information structures, each of which specifies a set of source and destination encodings. On return, each structure indicates one type of conversion the Text Encoding Converter supports. See TECConversionInfo (page 65) for more information. To determine how large an array to allocate, use the function TECCountDirectTextEncodingConversions (page 71).
maxDirectConversions
The maximum number of text encoding conversion information structures that the directConversions array can contain.
actualDirectConversions
A pointer to a value of type ItemCount. On output, this value indicates the number of text encoding conversion information structures returned in the directConversions array.
function result
A result code. See "Text Encoding Conversion Manager Result Codes" (page 42) for a list of possible values. If other than noErr, then one of the text conversion plug-ins encountered an error when polled by the Text Encoding Converter
DISCUSSION
The TECGetDirectTextEncodingConversions function returns the text encoding specifications in the array you pass to the function as the directConversions parameter, eliminating any duplicate information in the process. Consequently, the number of encodings TECGetDirectTextEncodingConversions returns in the available encodings array may be fewer than the number of elements you allocated for the array based on your call to TECCountDirectTextEncodingConversions (page 71). TECGetDirectTextEncodingConversions tells you the number of specifications it returns in the actualDirectConversions parameter.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
13 NOV 1997